package cn.com.cifi.mars.mapper.mars;

import cn.com.cifi.mars.bean.dto.MonitorConfigDetailDto;
import cn.com.cifi.mars.bean.vo.sys.rsp.MonitorConfigDetailVo;
import cn.com.cifi.mars.bean.vo.sys.rsp.MonitorDetailVo;
import cn.com.cifi.mars.entity.MonitorConfigDetail;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * <p>
 * 监控设置明细 Mapper 接口
 * </p>
 *
 * @author plx
 * @since 2020-02-05
 */
public interface MonitorConfigDetailMapper extends BaseMapper<MonitorConfigDetail> {

	/**
	 * 根据组织机构id,查询监控标准信息
	 * @param orgId
	 * @return
	 */
	List<MonitorConfigDetailVo>selectMonitorConfigDetailList(@Param("orgId")String orgId,@Param("isDel")String isDel);
	
	
	/**
	 * 根据监控指标详情id,查询监控标准详情表
	 */
	MonitorConfigDetail selectByIdAndIsDelete(@Param("id")String id,@Param("isDel")String isDel);

	/**
	 * 根据详情id修改监控详情表
	 * @param bean
	 * @return
	 */
	int updateByMonitorDetailId(MonitorConfigDetail bean);
	
	/**
	 * 根据监控配置id和组织机构Id查询监控标准数据
	 * @return
	 */
	MonitorConfigDetailVo selectByMonitorIdAndOrgId(@Param("monitorId")String monitorId,@Param("isDel")String isDel,@Param("orgId")String orgId);

	/**
	 * 根据组织机构id和监控标准详情id查询是否存在
	 * @param id
	 * @param orgId
	 * @param isDel
	 * @return
	 */
	MonitorConfigDetail selectByIdAndOrgIdAndIsDelete(@Param("id")String id,@Param("orgId")String orgId,@Param("isDel")String isDel);
	
	/**
	 * 根据组织机构id和指标编码查询监控详情
	 * @return
	 */
	List<MonitorConfigDetail>selectByOrgIdAndCode(@Param("targetCode")String targetCode
			,@Param("isdelete")String isdelete,@Param("orgId")String orgId);
	
	/**
	 * 根据组织机构id查询监控配置和详情
	 * @return
	 */
	List<MonitorConfigDetailDto>selectDetailByOrgId(@Param("isdelete")String isdelete,@Param("orgId")String orgId);
}
